package model;

/**
 *
 * @author Mads Nielsen
 */
public class Delivery {

    private Sale sale;
    private String name;
    private String address;
    private int zipCode;
    private String city;
    private double price;
    private int status = STATUS_NEW;
    public static final int STATUS_NEW = 1;
    public static final int STATUS_CLOSED = 2;
    public static final int STATUS_CANCELED = 3;

    public Delivery(Sale sale) {

        if (sale != null) {
            this.sale = sale;

            sale.setDelivery(this);

        }

    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public Sale getSale() {
        return sale;
    }

    public void setSale(Sale sale) {
        this.sale = sale;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getZipCode() {
        return zipCode;
    }

    public void setZipCode(int zipCode) {
        this.zipCode = zipCode;
    }
}
